﻿CREATE VIEW dbo.v_Upload#Update
WITH  VIEW_METADATA
AS
SELECT     dbo.t_Upload.ID, dbo.t_Upload.UploadInfoID, dbo.t_Upload.[Customer #], dbo.t_Upload.[Last Name], dbo.t_Upload.[First Name], 
                      dbo.t_Upload.[Full Name], dbo.t_Upload.Address, dbo.t_Upload.City, dbo.t_Upload.St, dbo.t_Upload.[Zip Code], dbo.t_Upload.[Home Phone #], 
                      dbo.t_Upload.[Work Phone #], dbo.t_Upload.[Car Year], dbo.t_Upload.Make, dbo.t_Upload.Model, dbo.t_Upload.Serial#, dbo.t_Upload.[Pmt Freq], 
                      dbo.t_Upload.[# Pmts Md], dbo.t_Upload.[Total $ Paid], dbo.t_Upload.[Open Date], dbo.t_Upload.[Maturity Date], dbo.t_Upload.[Pymnt Schedule], 
                      dbo.t_Upload.[# of Payments], dbo.t_Upload.[Payment Amount], dbo.t_Upload.[Total Payments], dbo.t_Upload.[1st# Payment Date], 
                      dbo.t_Upload.[Last Payment Date], dbo.t_Upload.[Next Payment Date], dbo.t_Upload.[# Pmts Remaining], dbo.t_Upload.[Balance Remaining], 
                      dbo.t_Upload.[Total Sales Price], dbo.t_Upload.[Finance Charges], dbo.t_Upload.[Purchase Price], dbo.t_Upload.[Other Chgs Balance], 
                      dbo.t_Upload.P#O#E#, dbo.t_Upload.[Loan#/Comments], dbo.t_Upload.[Primary SSN], dbo.t_Upload.[Amt Financed], dbo.t_Upload.[Principal Balance], 
                      dbo.t_Upload.[Interest Accrued], dbo.t_Upload.APR, dbo.t_Upload.Mileage, dbo.t_Upload.[Recourse Y/N?], dbo.t_Upload.[Black Book Value (Avg)], 
                      dbo.t_Upload.[Down Payment], dbo.t_Upload.[Joint Name], dbo.t_Upload.[Joint Address], dbo.t_Upload.[Joint City], dbo.t_Upload.[Joint State], 
                      dbo.t_Upload.[Joint Zipcode], dbo.t_Upload.[Joint SSN], dbo.t_Upload.[Joint H Phone#], dbo.t_Upload.[Joint W Phone#], dbo.t_Upload.[Primary Cell #], 
                      dbo.t_Upload.LoanID, dbo.t_Upload.ProcessingError, dbo.t_Upload.BookValue, dbo.t_Upload.BookValueTypeID, dbo.t_Upload.VinCheck, 
                      dbo.t_Upload.InterestTypeID, t_UploadDecision_1.UploadID, t_UploadDecision_1.Tier, t_UploadDecision_1.Recourse, 
                      dbo.t_UploadDecision.Price AS DecisionPrice, dbo.t_UploadDecision.ProgramID AS DecisionProgramID
FROM         dbo.t_Upload LEFT OUTER JOIN
                      dbo.t_UploadDecision ON dbo.t_Upload.ID = dbo.t_UploadDecision.UploadID LEFT OUTER JOIN
                      dbo.t_UploadDecision AS t_UploadDecision_1 ON dbo.t_Upload.ID = t_UploadDecision_1.UploadID

GO
EXECUTE sp_addextendedproperty @name = N'MS_DiagramPane1', @value = N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[44] 4[41] 2[9] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "t_Upload"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 364
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "t_UploadDecision_1"
            Begin Extent = 
               Top = 39
               Left = 503
               Bottom = 248
               Right = 654
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "t_UploadDecision"
            Begin Extent = 
               Top = 174
               Left = 301
               Bottom = 338
               Right = 452
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 66
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Wid', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'VIEW', @level1name = N'v_Upload#Update';


GO
EXECUTE sp_addextendedproperty @name = N'MS_DiagramPane2', @value = N'th = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 2625
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'VIEW', @level1name = N'v_Upload#Update';


GO
EXECUTE sp_addextendedproperty @name = N'MS_DiagramPaneCount', @value = 2, @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'VIEW', @level1name = N'v_Upload#Update';

